<?php

class Mageex_RelatedProduct_Block_Adminhtml_RelatedProduct_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs
{

  public function __construct()
  {
		parent::__construct();
		$type = '';
		if(Mage::registry('type') == 'product'){
			$type = 'Product';
		}else{
			$type = 'Category';
		}
		$this->setId('relatedproduct_tabs');
		$this->setDestElementId('edit_form');
		$this->setTitle(Mage::helper('relatedproduct')->__("$type Page Block"));
  }

  protected function _beforeToHtml()
  {
		
      $this->addTab('general', array(
          'label'     => Mage::helper('relatedproduct')->__("General"),
          'title'     => Mage::helper('relatedproduct')->__("General"),
          'content'   => $this->getLayout()->createBlock('relatedproduct/adminhtml_relatedproduct_edit_tab_form')->toHtml(),
      ));
	  /*
     $this->addTab('current', array(
          'label'     => Mage::helper('relatedproduct')->__("Currently Viewed Product"),
          'title'     => Mage::helper('relatedproduct')->__("Currently Viewed Product"),
          'content'   => $this->getLayout()->createBlock('relatedproduct/adminhtml_relatedproduct_edit_tab_current')->toHtml(),
      ));
	  */
	  $this->addTab('related', array(
          'label'     => Mage::helper('relatedproduct')->__("Related Products"),
          'title'     => Mage::helper('relatedproduct')->__("Related Products"),
          'content'   => $this->getLayout()->createBlock('relatedproduct/adminhtml_relatedproduct_edit_tab_related')->toHtml(),
      ));
      return parent::_beforeToHtml();
  }
}